<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>

	<h:outputText
		value="System error:orderInfoInputPanel: order model current is null"
		rendered="#{orderModel.current == null}"></h:outputText>
	<h:panelGrid id="newOrderInfoPanel" columns="1"
		style="float:left;width:100%">
		<p:separator></p:separator>
		<h:panelGrid columns="2" style="float:left;width:100%">

			<h:outputText value="Name" style="font-size:1.3em;color:green"></h:outputText>

			<h:outputText
				value="  #{userModel.current.lastName}   #{userModel.current.firstName}"
				style="font-size:1.3em;font-weight:bold;color:blue" />
			<h:outputText value="Telephone"></h:outputText>
			<h:outputText value="#{userModel.current.telephone} " />
			<h:outputText value="Email"></h:outputText>
			<h:outputText value="#{userModel.current.email}  " />
		</h:panelGrid>

		<p:separator></p:separator>
		<p:commandButton value="Show available Dates"
			style="background-color:pink;float:left"
			actionListener="#{shoppingCartController.initByAdmin}" ajax="true"
			update=":detailForm"></p:commandButton>

		<p:panelGrid columns="1" rendered="#{shoppingCartModel.isInitialized}" style="width:100%">
			<p:dataTable
				value="#{shoppingCartModel.availablePickupDatesForAdmin}"
				selection="#{shoppingCartModel.newRequiredDate}" var="marketDate"
				emptyMessage="#{msgs.pickupDateListEmptyMessage}"
				rowKey="#{marketDate.key}">
				<p:column>
					<h:outputText value="#{marketDate.weekOfYearLabel}"></h:outputText>
				</p:column>
				<p:column>
					<h:outputText value="#{marketDate.dayOfWeekLabel}"></h:outputText>
				</p:column>
				<p:column>
					<h:outputText value="#{marketDate.dateLabel}"></h:outputText>
				</p:column>
				<p:column>
					<h:outputText value="#{marketDate.timeRangeLabel}"></h:outputText>
				</p:column>
				<p:column selectionMode="single" rendered="#{!marketDate.isPasted}"
					style="width:28px" />
				<p:column selectionMode="single" rendered="#{marketDate.isPasted}"
					style="width:28px;background-color:yellow" />
			</p:dataTable>
			<h:inputHidden></h:inputHidden>
			<p:commandButton value="Go Shopping"
				action="#{shoppingCartController.goShopping}"
				style="font-size:2.0em;font-weight:bold;color:blue;float:right"></p:commandButton>
			<p:separator></p:separator>

		</p:panelGrid>
	</h:panelGrid>
</ui:composition>
</html>